[CH-436] support columns with different nullable type when split for union#437
[CH-436] support columns with different nullable type when split for union#437shuai-xu wants to merge 765 commits intoKyligence:clickhouse_backendfrom
Conversation
Refactor releasing process
Simplify strip for new packages
…l_flag Resurrect build hash
…ash_v2 One more try to resurrect build hash
New package clickhouse-keeper
Docker release and regular builds
Fix automatic bucket prefix for master
…id IPv6, IPv4 values
…ease Backport release to 22.3
Backport ClickHouse#35799 to 22.3: Fix extract function parser
Backport ClickHouse#35733 to 22.3: Added settings for insert of invalid IPv6, IPv4 values
Backport ClickHouse#35820 to 22.3: Avoid processing per-column TTL multiple times
- Allow define version as file - Add inline cache - Fix auto_release_type function
Support functions position/locate
…ence#354) ShuffleSplitter improvement: support multiple subdirs
Support full join with join condition Co-authored-by: shuai.li <shuai.li@kyligence.io>
Support Decimal type in Gluten Co-authored-by: shuai.li <shuai.li@kyligence.io>
…like Column 'deviceid' is not presented in input data (Kyligence#388)
Co-authored-by: shuai.li <shuai.li@kyligence.io>
…voking of JNI_Onload and finalized once at exit (Kyligence#377)
Co-authored-by: shuai.li <shuai.li@kyligence.io>
Support partitioning with expressions
Co-authored-by: Robert Schulze <robert@clickhouse.com>
|
Can one of the admins verify this patch? |
| { | ||
| // for union, the columns type may be different for the two steam, one is nullable, the other not. | ||
| std::string l_name = typeid(*accumulated_columns[i]).name(); | ||
| std::string r_name = typeid(*block.getByPosition(i).column).name(); |
There was a problem hiding this comment.
it is better to use checkAndGetColumn instead of typeid().name()
There was a problem hiding this comment.
auto l_type = accumulated_columns[i]->getDataType();
auto r_type = block.getByPosition(i).column->getDataType();
if (l_type == r_type)
{
xxx
}
else if (l_type == TypeIndex::Nullable)
{
xxx
}
else if (r_type == TypeIndex::Nullable)
{
xxx
}
|
The main problem here is that, the 1st block comed into You can make an assumption that, if we meet a nullable column once, all results should be nullable. but we may have spill some blocks with non-nullable columns out into next stage before we meet the first block with nullable. |
6528ff0 to
52be833
Compare
dc60d55 to
8066113
Compare
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
This pr supports that when split blocks, they may have differnt nullable types as they may come from two different steams of union.
It fix #436 .